<template>
  <n-config-provider
    :locale="locale"
    :date-locale="dateLocale"
    :theme="themeStore.darkTheme ? darkTheme : null"
    :theme-overrides="themeStore.naiveThemeOverrides"
  >
    <!--    <n-global-style />-->
    <n-loading-bar-provider>
      <LoadingBar />
      <n-dialog-provider>
        <DialogContent />
        <n-message-provider>
          <MessageContent />
          <NotificationProvider>
            <NotificationContent />
            <slot></slot>
          </NotificationProvider>
        </n-message-provider>
      </n-dialog-provider>
    </n-loading-bar-provider>
    <EvDialog />
  </n-config-provider>
</template>

<script setup>
import { ref } from 'vue';
import { darkTheme, dateZhCN, zhCN } from 'naive-ui';
import MessageContent from './MessageContent.vue';
import DialogContent from './DialogContent.vue';
import LoadingBar from './LoadingBar.vue';
import EvDialog from './EvDialog.vue';
import { useAppStore } from '@/store/modules/app.js';
import NotificationProvider from './NotificationProvider.vue';
import NotificationContent from './NotificationContent.vue';
import { useThemeStore } from '@/store/modules/theme.js';

const themeStore = useThemeStore();
const appStore = useAppStore();
let locale = ref(zhCN);
let dateLocale = ref(dateZhCN);
</script>
